package com.magnificent.atlantis.common.entity.messages;

import javax.persistence.*;
import java.util.ArrayList;

/**
 * User: Babanin
 * Date: 06.05.2009
 * Time: 21:11:36
 */
@Entity()
@Table(name = "message_re_invite")
public class ServerReInviteMessage extends ServerInviteMessage {
    private String oldTitle;

    @Basic()
    @Column()
    public String getOldTitle() {
        return oldTitle;
    }

    public void setOldTitle(String oldTitle) {
        this.oldTitle = oldTitle;
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;

        ServerReInviteMessage that = (ServerReInviteMessage) o;

        if (oldTitle != null ? !oldTitle.equals(that.oldTitle) : that.oldTitle != null) return false;

        return true;
    }

    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (oldTitle != null ? oldTitle.hashCode() : 0);
        return result;
    }
}
